<script type='text/javascript'>
          	$(function() {
		                   $('#from').datepicker({
			                   changeMonth: true,
			                   changeYear: true,
                               dateFormat: 'yy-mm-dd'
		                   });
	                   });
	                   $(function() {
                               $('#to').datepicker({
                                   changeMonth: true,
                                   changeYear: true,
                                   dateFormat: 'yy-mm-dd'
                               });
                           });
</script>
<div class='center_form'>
    <div class="center_form_right">
        <div class='center_form_btn_div' onclick='javascript:Common.submit();'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/save.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("saveBtn"); ?></div>
        </div>
        <?php
        if(AAService::isAllowed("promotion", "deletesaleprice")){
        ?>
        <div class='center_form_btn_div' onclick='javascript:Common.gotoUrl("<?php echo HttpUtil::baseUrl();?>/promotion/promotion/deletesaleprice/id/<?php echo $this->id;?>")'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/delete.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("delBtn");?></div>
        </div>
        <?php }?>   
        <div class='center_form_btn_div' onclick='javascript:Common.gotoUrl("<?php echo HttpUtil::baseUrl();?>/promotion/promotion/saleprice");'>
            <div class='center_form_btn_pic'>
                <img src='<?php echo HttpUtil::baseUrl();?>/images/cancel.gif'/>
            </div><div class='center_form_btn_text'><?php echo $this->translate("cancelBtn"); ?></div>
        </div>
    </div>
</div>
<div class="clear"></div>
<div class="centerbig_form">
      <div class="center_top"><span class="center_top_title"><?php echo $this->translate("editSalePricePromotion"); ?></span></div>
      <div class="right_form_content">
            <div class="centerbig_right">
               <div class="form_content">
                    <form action="<?php echo $this->form->getAction(); ?>" method="post">
                        <input type="hidden" value="<?php echo $this->id; ?>" name="id" />
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->translate("productTitle"); ?></div>
                            <div class="form_element">
                                <label><?php echo $this->productItem['title'];?></label>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->translate("attribute"); ?></div>
                            <div class="form_element">
                                <label><?php 
                                            if(!empty($this->productItem['attribute_1']) && !empty($this->productItem['value_1'])){
                                                 echo $this->productItem['attribute_1'] . ": " . $this->productItem['value_1'] . "<br/>";
                                            }
                                            if(!empty($this->productItem['attribute_2']) && !empty($this->productItem['value_2'])){
                                                 echo $this->productItem['attribute_2'] . ": " . $this->productItem['value_2'] . "<br/>";
                                            }
                                            if(!empty($this->productItem['attribute_3']) && !empty($this->productItem['value_3'])){
                                                 echo $this->productItem['attribute_3'] . ": " . $this->productItem['value_3'] . "<br/>";
                                            }
                                            if(!empty($this->productItem['attribute_4']) && !empty($this->productItem['value_4'])){
                                                 echo $this->productItem['attribute_4'] . ": " . $this->productItem['value_4'] . "<br/>";
                                            }
                                            if(!empty($this->productItem['attribute_5']) && !empty($this->productItem['value_5'])){
                                                 echo $this->productItem['attribute_5'] . ": " . $this->productItem['value_5'] . "<br/>";
                                            }
                                        ?>
                                </label>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->translate("listPrice"); ?></div>
                            <div class="form_element">
                                <label><?php echo $this->productItem['list_price'];?></label>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->salePrice->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text"  id="salePrice" name="salePrice" value="<?php echo $this->form->getValue('salePrice');?>" />
                                <div class="form_element_error" id="amount_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->salePrice);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->from->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text"  id="from" name="from" value="<?php echo $this->form->getValue('from');?>" />
                                <div class="form_element_error" id="from_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->from);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="form_line_div">
                            <div class="form_element_label"><?php echo $this->form->to->getlabel() ?></div>
                            <div class="form_element">
                                <input type="text"  id="to" name="to" value="<?php echo $this->form->getValue('to');?>" />
                                <div class="form_element_error" id="to_error"><?php echo ZendFormUtil::renderErrorMessage($this->form->to);?></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                   </form>
               </div>
            </div>
      </div>
      <div class='clear'></div>
</div>
<div class='clear'></div>
<div id="searchDialog"></div>